package com.devinsor.spring.framework.webmvc.servlet;

import java.lang.reflect.Method;
import java.util.regex.Pattern;

/**
 * @program: com.devinsor
 * @description:
 * @author: JackRen
 * @create: 2020-05-14 10:46
 **/
public class HandlerMapping {
    /**
      * @author JackRen
      * @date 2020/5/14
     * 保存方法对应的Controller实例对象
    */
    private Object controller;
    /**
      * @author JackRen
      * @date 2020/5/14
     * 保存映射的方法
    */
    private Method method;
    /**
      * @author JackRen
      * @date 2020/5/14
     * 保存URL
    */
    private Pattern pattern;

    public HandlerMapping(Pattern pattern, Object controller, Method method) {
        this.controller = controller;
        this.method = method;
        this.pattern = pattern;
    }

    public Object getController() {
        return controller;
    }

    public void setController(Object controller) {
        this.controller = controller;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public Pattern getPattern() {
        return pattern;
    }

    public void setPattern(Pattern pattern) {
        this.pattern = pattern;
    }

}
